// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import store from './store.js'
import {
	post,
	upload
} from './utils/request/index'

import setClipboardData from './utils/copy.js'
import './js_sdk/ican-H5Api/ican-H5Api.js'

Vue.config.productionTip = false

Vue.prototype.$post = post;
Vue.prototype.$upload = upload;
Vue.prototype.$setClipboardData = setClipboardData.setClipboardData;
import uView from "uview-ui";
Vue.use(uView);
App.mpType = 'app';

// 系统信息
const mySysInfo = () => {
	const sys = uni.getSystemInfoSync(); // 异步获取系统信息
	const data = {
		top: sys.statusBarHeight, // 手机状态栏的高度
		height: sys.statusBarHeight + uni.upx2px(90), // 手机状态栏的高度 + 90px
		screenHeight: sys.screenHeight,
		platform: sys.platform, // 操作系统
		model: sys.model,
		windowHeight: sys.windowHeight,
		windowBottom: sys.windowBottom,
		deviceId: sys.deviceId
	};
	// #ifdef MP-WEIXIN || MP-BAIDU || MP-QQ || MP-TOUTIAO || MP-WEIXIN
	const custom = uni.getMenuButtonBoundingClientRect();
	data.top = custom.bottom;
	// #endif		
	// #ifdef MP-ALIPAY
	data.height = sys.statusBarHeight + sys.titleBarHeight;
	// #endif
	return data;
}
Vue.prototype.$mySysInfo = mySysInfo;

const app = new Vue({
	...App,
	store
})
app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif
